﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.XF
{
    class Class2
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("重疾"))
            {
                da.Value = ppa.Amount;
                ppa.SchemePeriodActing.BasicPolicyPeriodActing.IsCurrentFinish = true;
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc2(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("男/女性重疾"))
            {
                da.Value = ppa.Amount * 1.5 ;
                ppa.SchemePeriodActing.BasicPolicyPeriodActing.IsCurrentFinish = true;
                ppa.IsCurrentFinish = true;
            }
        }

        public void Calc2(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.InsurantStates.Contains("早期治疗"))
            {
                da.Value = ppa.Amount * 0.2;
            }
        }
    }
}
